From: Adel Gadllah Date: Sun, 4 Aug 2013 11:51:06 +0000 (+0200) Subject: lookingGlass: Avoid infinite animation time X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3825 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d2709c681f365c67f0e9b8c693b4c8c113a9e2bd;p=gnome-shell.git lookingGlass: Avoid infinite animation time Math.max(x / y, 0.5) will return infinite when y is 0. Fix that by using Math.min() which was the actual intent of the patch. --- diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 30493124f..268d45f57 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -1150,7 +1150,7 @@ const LookingGlass = new Lang.Class({ Main.popModal(this._entry); - Tweener.addTween(this.actor, { time: Math.max(0.5 / St.get_slow_down_factor(), 0.5), + Tweener.addTween(this.actor, { time: Math.min(0.5 / St.get_slow_down_factor(), 0.5), transition: 'easeOutQuad', y: this._hiddenY, onComplete: Lang.bind(this, function () {